<template>
  <el-form ref="form" :model="form" label-width="100px" style="display: inline-block"  :hide-required-asterisk="true" :show-message="false">
    <el-form-item label="用户姓名" prop="username">
      <el-input v-model="form.username" auto-complete="off"></el-input>
    </el-form-item>
    <el-form-item label="用户账号" prop="phonenum">
      <el-input v-model="form.phonenum" auto-complete="off"></el-input>
    </el-form-item>
    <el-form-item label="用户密码:" prop="name" style="display: inline-block">
      <el-input type="password" maxlength="20"  v-model="form.password" style="width: 450px;"></el-input>
    </el-form-item>
    <el-form-item required label="用户类型:"  prop="categoryId" style="display: inline-block">
      <el-select clearable v-model="form.usertype" placeholder="用户类型" style="width: 450px;">
        <el-option
          v-for="item in usertypes"
          :key="item.id"
          :value="item.id"
          :label="item.value"
        />
      </el-select>
    </el-form-item>
<!--    <el-form-item required label="用户状态:"  prop="userstatus" style="display: inline-block">-->
<!--      <el-select clearable v-model="form.userstatus" placeholder="用户状态" style="width: 450px;">-->
<!--        <el-option-->
<!--          v-for="item in menus"-->
<!--          :key="item.id"-->
<!--          :value="item.id"-->
<!--          :label="item.content"-->
<!--        />-->
<!--      </el-select>-->
<!--    </el-form-item>-->
    <el-form-item label="用户备注:">
      <el-input type="textarea" maxlength="200" :autosize="{ minRows: 3, maxRows: 6}" v-model="form.remark"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button size="small" round>取 消</el-button>
      <el-button  size="small" round type="primary" @click="onSubmit">保存</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
  export default {
    name: 'DialogDataForm',
    props: {
      value: {
        type: Object,
        default: () => ({
        })
      },
      menus: {
        type: Array,
        default: () => []
      }
    },
    data() {
      return {
        usertypes:[{id:1,value:'管理员'}],
        form: {

        },
        rules: {

        }
      }
    },
    created() {
    },
    methods: {
      onSubmit() {
        this.$refs.form.validate(valid => {
          if (valid) {

          } else {
            return false
          }
        })
      }
    }
  }
</script>
<style lang="scss" scoped>
</style>
